<?php


namespace app\api\alipay;

class VerifyNotify
{
	public $AlipaySdk;
	public function __construct($config)
	{
		$this->AlipaySdk = new AlipaySdk($config);
	}
	public function verifyNotify($parameters)
	{
		try {
			$instance = $this->AlipaySdk->instance();
			$result = $instance->payment()->common()->verifyNotify($parameters);
			return $result;
			$responseChecker = new \Alipay\EasySDK\Kernel\Util\ResponseChecker();
			if ($responseChecker->success($result)) {
				return $result;
			} else {
				return false;
				return $result->msg . "," . $result->subMsg;
			}
		} catch (\Exception $e) {
			return false;
			return $e->getMessage();
		}
	}
}